#!/bin/bash
currentPath=$(pwd)

libPath=$(pwd)/../libexosip2-5.1.1

if [ -d "./libexosip" ]; then
    rm -rf libexosip
fi
mkdir libexosip
cd libexosip
installPath=$(pwd)


export PKG_CONFIG_PATH=/home/gj027/Test/C++/jrtplib/libs/libosip/lib/pkgconfig:$PKG_CONFIG_PATH
# export PKG_CONFIG_PATH=/home/gj027/libs/openssl/openssl-1.0.2t/build/lib/pkgconfig:$PKG_CONFIG_PATH
echo ${PKG_CONFIG_PATH}


# export C_INCLUDE_PATH=${currentPath}/libosip/include:$C_INCLUDE_PATH

echo $C_INCLUDE_PATH

cd ${libPath}
./configure --prefix=${installPath}
make
make install
cd ${currentPath}

# 执行make时遇到问题，找了篇帖子解决了，原因不详细  // TODO 研究
# aclocal-1.14: command not found
# autoreconf -ivf   